package com.glorystone.ins.dao;

import com.glorystone.ins.common.common.PageVo;
import com.glorystone.ins.common.common.Pageable;
import com.glorystone.ins.domain.SysUser;
import com.glorystone.ins.interceptor.PageList;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    int deleteByPrimaryKey(Long id);

/*    int insert(SysUser record);*/

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUser record);


    SysUser getUserByUserName(String jobNumber);

    /**
     * 查询登录信息
     *
     * @param username
     * @param pwd
     * @return
     */
    SysUser getUserByUserNameAndPwd(@Param("username") String username, @Param("pwd") String pwd);

    int modifyPassword(SysUser user);

    PageList<SysUser> findUserList(@Param("vo") PageVo vo, Pageable pageable);
    
    int updateStatus(SysUser sysuser);
    
    List<String> getIdsByOfficeId(Long officeId);

	SysUser onlyJobNumber(String jobNumber);
    
    //查询外部用户
    PageList<SysUser> selectUser(@Param("vo") PageVo vo, Pageable pageable);
    
    //外部用户增加接口
    void insertExternalUser(SysUser user);
    
    //重置密码
    int resetPassword(SysUser user);
    
    //查询某部门下的所有人员
    List<SysUser> selectByOfficeId(Long officeId);
    
    //根据用户id查询登录名
    SysUser selectById(Long tid);
    
    //外部用户修改接口
    void updateInsertExternalUser(SysUser user);
    
    //修改登录状态
    int editLand(Long tid);
}